﻿@{
    var lnode = ViewBag.Layout.CurrentLeftNode;
    var cnodes = ViewBag.Layout.CurrentLeftNode.ChildNodes;
    if (ViewBag.Layout.CurrentLeftNode.ChildNodes.Count == 0)
    {
        lnode = ViewBag.Layout.CurrentLeftNode.ParentNode;
        cnodes = ViewBag.Layout.CurrentLeftNode.ParentNode.ChildNodes;
    }
}
<div align="left" id="right-internal-wrapper">
    <!--Start Body Right Section-->
    <div align="left" class="left-top-nav">
        <div class="left-nav-top">
            <strong><a href="@lnode.Url">@lnode.Title</a></strong></div>
        <div class="left-nav-middle">
            <div class="nav">
                <ul>
                    @foreach (var n in cnodes)
                    {
                        <li><span>
                            <img src="/Content/Images/navbullet.png" /></span> <span><a href="@n.Url">@n.Title</a></span></li>
                    }
                </ul>
            </div>
        </div>
        <div class="left-nav-bottom">
        </div>
        @*
        <div style="padding-top: 10px;">
            @foreach (var n in lnode.ParentNode.ChildNodes)
            {
                if(n.ID != lnode.ID)
                {
            <div class="navbg">
                <div class="nav-btn-bg">
                    <a href="@n.Url">@n.Title</a></div>
            </div>
                    }
            }
        </div>
        *@
    </div>
</div>
<!--End Body Right Section-->
<div style="clear: both;">
</div>
